import {get, post} from '../http';
import {baseUrl} from '/src/config/env';

const pageUrl = 'nav/'
    , homeUrl = baseUrl + pageUrl;


// 引擎(列表)
export const engine = params => get(homeUrl + 'engine', params);
// 引擎(获取我分享的引擎)
export const getShareEngine = params => get(homeUrl + 'getShareEngine', params, true);
// 引擎(分享引擎)
export const shareEngine = data => post(homeUrl + 'shareEngine', data, true);
// 引擎(删除分享引擎)
export const delShareEngine = data => post(homeUrl + 'delShareEngine', data, true);
// 引擎(修改分享引擎)
export const editShareEngine = data => post(homeUrl + 'editShareEngine', data, true);
// 引擎(添加)
export const addEngine = data => post(homeUrl + 'addEngine', data, true);
// 引擎(商店添加)
export const joinEngine = data => post(homeUrl + 'joinEngine', data, true);
// 引擎(编辑)
export const editEngine = data => post(homeUrl + 'editEngine', data, true);
// 引擎(排序)
export const orderEngine = data => post(homeUrl + 'orderEngine', data, true);
// 引擎(删除)
export const delEngine = data => post(homeUrl + 'delEngine', data, true);


// 分类(列表)
export const menu = params => get(homeUrl + 'menu', params);
// 分类(排序)
export const orderMenu = data => post(homeUrl + 'orderMenu', data, true);
// 分类(添加)
export const addMenu = data => post(homeUrl + 'addMenu', data, true);
// 分类(编辑)
export const editMenu = data => post(homeUrl + 'editMenu', data, true);
// 分类(删除)
export const delMenu = data => post(homeUrl + 'delMenu', data, true);


// 书签(列表)
export const bookmark = params => get(homeUrl + 'bookmark', params);
// 书签(获取我分享的书签)
export const getShareBookmark = params => get(homeUrl + 'getShareBookmark', params, true);
// 书签(搜索)
export const searchBookmark = params => get(homeUrl + 'searchBookmark', params);
// 书签(添加)
export const addBookmark = data => post(homeUrl + 'addBookmark', data, true);
// 书签(添加书签到分类中)
export const joinBookmarkToMenu = data => post(homeUrl + 'joinBookmarkToMenu', data, true);
// 书签(排序)
export const orderBookmark = data => post(homeUrl + 'orderBookmark', data, true);
// 书签(分享书签)
export const shareBookmark = data => post(homeUrl + 'shareBookmark', data, true);
// 书签(删除分享书签)
export const delShareBookmark = data => post(homeUrl + 'delShareBookmark', data, true);
// 引擎(修改分享书签)
export const editShareBookmark = data => post(homeUrl + 'editShareBookmark', data, true);
// 书签(移动到其它分类)
export const moveBookmarkByMenu = data => post(homeUrl + 'moveBookmarkByMenu', data, true);
// 书签(编辑)
export const editBookmark = data => post(homeUrl + 'editBookmark', data, true);
// 书签(删除)
export const delBookmark = data => post(homeUrl + 'delBookmark', data, true);


// 书签(点击量排序)
export const quick = params => get(homeUrl + 'quick', params);
// 搜索
export const search = data => post(homeUrl + 'search', data);
// 点击
export const click = data => post(homeUrl + 'click', data);

// 导入
//export const importBookmark = data => post(homeUrl + 'import', data);
